package cn.tedu.baidashi.service.Impl;

import cn.tedu.baidashi.mapper.ProvinceMapper;
import cn.tedu.baidashi.model.Province;
import cn.tedu.baidashi.service.IProvinceService;
import cn.tedu.baidashi.vo.ProvinceVo;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author tedu.cn
 * @since 2022-02-16
 */
@Service
public class ProvinceServiceImpl extends ServiceImpl<ProvinceMapper, Province> implements IProvinceService {
    @Autowired
    ProvinceMapper provinceMapper;

    @Override
    public ProvinceVo selectProvinceById(Integer id) {
        ProvinceVo provinceVo=provinceMapper.selectProvinceNameById(id);
        return provinceVo;
    }

    @Override
    public List<ProvinceVo> getProvinceNames() {
        List<ProvinceVo> provinceVos=provinceMapper.getProvinceNames();
        return provinceVos;
    }

//    @Override
//    public List<ProvinceVo> getProvinceNames(id) {
//        List<ProvinceVo> provinceVos=provinceMapper.getProvinceNames();
//        return provinceVos;
//    }
}
